"""
Author: yida
Time is: 2022/5/9 11:12
this Code: 解析离线Html
"""
# 导入seleinum的webdriver接口
import time

import numpy as np
from bs4 import BeautifulSoup
import numpy


file = open("origin.html", encoding="utf-8")
text = file.read()

soup = BeautifulSoup(text, 'html.parser')
titles = soup.select('.ContentItem-title a')
result = []
for title in titles:
    result.append(title.string)
print(result)
with open("result.txt", 'w') as f:
    for i in result:
        f.write(i)
        f.write("\n")
print("保存成功...")
